﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="uc_tender_app.ascx.cs" Inherits="main_uc_tender_app" %>
<%@ Register Assembly="ESWebFramework.I18N" Namespace="ESWebFramework.I18N" TagPrefix="eswf" %>
<script type="text/javascript">
    $(document).ready(function() {
        // Datepicker
        $('#<%=tb_OppeningDate.ClientID%>').datepicker({ dateFormat: 'dd/mm/yy' });
        $('#<%=tb_ClosingDate.ClientID%>').datepicker({ dateFormat: 'dd/mm/yy' });
     })
    
    function UpdateStep3Tender() {
        var Step3Tender = {
            id: $('#<%=tb_Tender_app_id.ClientID %>').val(),
            app_id: $('#<%=tb_application_id.ClientID %>').val(),
            opening_date: $('#<%=tb_OppeningDate.ClientID %>').val(),
            closing_date: $('#<%=tb_ClosingDate.ClientID %>').val(),
            transport_type_id: $('#<%=ddlTransportTypes.ClientID %>').val(),
            placement_type_id: $('#<%=ddlPlacementTypes.ClientID %>').val(),
            packing_type_id: $('#<%=ddlPackingTypes.ClientID %>').val(),
            type_goods_id: $('#<%=ddlGoods.ClientID %>').val(),
            weight_goods: $('#<%=tbWeightOfGoods.ClientID %>').val(),
            payment_type_id: $('#<%=tbPaymentType.ClientID %>').val(),
            special_condition_type: $('#<%=ddlSpecualConditionTypes.ClientID %>').val(),
            other_information: $('#<%=tbOtherInformattions.ClientID %>').val()
        }

        $('#saving-div').html('<h3><i>Saving...</i></h3>');
        $.ajax
        ({
            url: "webservices/Application.asmx/UpdateStep3Tender",
            data: '{step3: ' + $.toJSON(Step3Tender) + '}',
            dataType: "json",
            async: false,
            contentType: "application/json; charset=utf-8",
            type: "POST",
            complete: function(json1) {
                var c = JSON.parse(json1.responseText);
                var d = JSON.parse(c.d);
                
                    $('#saving-div').html('<h3><i>'+d+'</i></h3>');
                    setTimeout('ClearMessage()', 3000);
            }
        });
        return false;
    }

    function ClearMessage() {
        $('#saving-div').html('');
        window.location.href = window.location.href;
    }

</script>
<div id="saving-div"></div>
<asp:HiddenField ID="tb_Tender_app_id" runat="server" />
<asp:HiddenField ID="tb_application_id" runat="server" />
<!--OppeningDate-->
<div style="float: left; clear: both; float: left; width: 50%; text-align: left;
    padding-top: 8px; padding-left: 12px">
    <eswf:ESi18nLabel ID="lbl_openingdate" TextReference="openingdate" runat="server"></eswf:ESi18nLabel>
</div>
<div style="padding-top: 8px; text-align: left; font-weight: bold">
    <asp:Label ID="lblOppeningDate" runat="server" Text=""></asp:Label>
    <asp:TextBox ID="tb_OppeningDate" MaxLength="40" Width="200px" Visible="false" CssClass="formItem" runat="server"></asp:TextBox>
</div>
<!--ClosingDate-->
<div style="float: left; clear: both; float: left; width: 50%; text-align: left;
    padding-top: 8px; padding-left: 12px">
    <eswf:ESi18nLabel ID="lbl_closingdate" TextReference="closingdate" runat="server"></eswf:ESi18nLabel>
</div>
<div style="padding-top: 8px; text-align: left; font-weight: bold">
    <asp:Label ID="lblClosingDate" runat="server" Text=""></asp:Label>
    <asp:TextBox ID="tb_ClosingDate" MaxLength="40" Width="200px" Visible="false" CssClass="formItem" runat="server"></asp:TextBox>
</div>
<!--TransportType-->
<div style="float: left; clear: both; float: left; width: 50%; text-align: left;
    padding-top: 8px; padding-left: 12px">
     <asp:Label ID="lbl_type_of_transport" runat="server"></asp:Label>
</div>
<div style="padding-top: 8px; text-align: left; font-weight: bold">
    <asp:Label ID="lblTransportTypes" runat="server" Text=""></asp:Label>
    <asp:DropDownList ID="ddlTransportTypes" runat="server" CssClass="formItem" Width="200px" Visible="false">
    </asp:DropDownList>
</div>

<!--PackingType-->
<div style="float: left; clear: both; float: left; width: 50%; text-align: left;
    padding-top: 8px; padding-left: 12px">
    <eswf:esi18nlabel id="ESi18nLabel46" textreference="packing_type" runat="server"></eswf:esi18nlabel>
</div>
<div style="padding-top: 8px; text-align: left; font-weight: bold">
    <asp:Label ID="lblPackingType" runat="server" Text=""></asp:Label>
    <asp:DropDownList ID="ddlPackingTypes" runat="server" CssClass="formItem" Width="200px" Visible="false">
    </asp:DropDownList>
</div>
<!--Placement Types:-->
<div style="float:left;clear:both;width:50%;text-align:left;padding-top:8px;padding-left:12px">
    <eswf:ESi18nLabel ID="ESi18nLabel45" TextReference="placement_type" runat="server"></eswf:ESi18nLabel>
</div>
<div style="padding-top:8px;text-align:left;font-weight:bold">
<asp:Label ID="lblPlacementType" runat="server" Text=""></asp:Label>
<asp:DropDownList ID="ddlPlacementTypes" Visible="false" runat="server" CssClass="formItem" Width="200px">
    </asp:DropDownList>
</div>
<!--Type of goods-->
<div style="float: left; clear: both; width: 50%; text-align: left; padding-top: 8px; padding-left: 12px">
    <eswf:esi18nlabel id="ESi18nLabel7" textreference="type_of_goods" runat="server"></eswf:esi18nlabel>
</div>
<div style="padding-top: 8px; text-align: left; font-weight: bold">
    <asp:Label ID="lblGoods" runat="server" Text=""></asp:Label>
    <asp:DropDownList ID="ddlGoods" runat="server" CssClass="formItem" Width="200px" Visible="false">
    </asp:DropDownList>
</div>
<!--Weight of goods:-->
<div style="float: left; clear: both; width: 50%; text-align: left; padding-top: 8px; padding-left: 12px">    
     <eswf:esi18nlabel id="ESi18nLabel1" textreference="weight_of_goods" runat="server"></eswf:esi18nlabel>
</div>
<div style="padding-top: 8px; text-align: left; font-weight: bold">
    <asp:Label ID="lblWeightOfGoods" runat="server" Text=""></asp:Label>
    <asp:TextBox ID="tbWeightOfGoods" MaxLength="40" Width="200px" CssClass="formItem" runat="server" Visible="false"></asp:TextBox>
</div>
<!--Payment Type: -->
<div style="float: left; clear: both; width: 50%; text-align: left; padding-top: 8px; padding-left: 12px"> 
    <eswf:esi18nlabel id="ESi18nLabel11" textreference="payment_type" runat="server"></eswf:esi18nlabel>
</div>
<div style="padding-top: 8px; text-align: left; font-weight: bold">
    <asp:Label ID="lblPaymentType" runat="server" Text=""></asp:Label>
    <asp:TextBox ID="tbPaymentType" MaxLength="40" Width="200px" Visible="false" CssClass="formItem" runat="server"></asp:TextBox>
</div>
<!--SpecCondition-->
<div style="clear: both; float: left; width: 50%; text-align: left; padding-top: 8px;
    padding-left: 12px">
    <eswf:esi18nlabel id="ESi18nLabel47" textreference="special_conditions" runat="server"></eswf:esi18nlabel>
</div>
<div style="padding-top: 8px; text-align: left; font-weight: bold">
    <asp:Label ID="lblSpecCondition" runat="server" Text=""></asp:Label>
    <asp:DropDownList ID="ddlSpecualConditionTypes" runat="server" CssClass="formItem" Width="200px" Visible="false">
    </asp:DropDownList>
</div>
<!--Other Info-->
<div style="clear: both; float: left; width: 50%; text-align: left; padding-top: 8px;
    padding-left: 12px">
    <eswf:esi18nlabel id="ESi18nLabel48" textreference="other_informattions" runat="server"></eswf:esi18nlabel>
</div>
<div style="padding-top: 8px; text-align: left; font-weight: bold">
    <asp:Label ID="lblOtherInfo" runat="server" Text=""></asp:Label>
    <asp:TextBox ID="tbOtherInformattions" TextMode="MultiLine" Visible="false" Height="100px" Width="200px" CssClass="formItem" runat="server"></asp:TextBox>
</div>
 <div style="clear:both; text-align:right;width:700px;padding-right:30px;">
      <input type="button" id="btn_UpdateTechicalInfo45" visible="false" value="Save" onclick="UpdateStep3Tender()" runat="server" class="btn_add_more" />
</div>
